// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class RXD : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Dispense Sub-ID Counter",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM DispenseSubIDCounter {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Dispense/Give Code",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"CE_0292")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"CE_0292")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"CE_0292")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"CWE")]
		[VaccinesadministeredcodeCVXparenteralunlessoralisnoted]
	    public CWE DispenseGiveCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Date/Time Dispensed",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DateTimeDispensed {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Actual Dispense Amount",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM ActualDispenseAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Actual Dispense Units",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ActualDispenseUnits {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Actual Dosage Form",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ActualDosageForm {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Prescription Number",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST PrescriptionNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Number of Refills Remaining",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM NumberofRefillsRemaining {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Dispense Notes",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.True, HL7Required.True,"ST")]
	    public ST[] DispenseNotes {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Dispensing Provider",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.True, HL7Required.True,"XCN")]
	    public XCN[] DispensingProvider {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Substitution Status",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"ID")]
		[SubstitutionStatus]
	    public ID SubstitutionStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Total Daily Dose",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"CQ")]
	    public CQ TotalDailyDose {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Dispense-to Location",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"CM_LA1")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"LA2")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"LA2")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"LA2")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"LA2")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"LA2")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"LA2")]
	    public LA2 DispensetoLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Needs Human Review",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID NeedsHumanReview {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Pharmacy/Treatment Supplier's Special Dispensing Instructions",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] PharmacyTreatmentSuppliersSpecialDispensingInstructions {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Actual Strength",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM ActualStrength {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Actual Strength Unit",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ActualStrengthUnit {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Substance Lot Number",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.True, HL7Required.True,"ST")]
	    public ST[] SubstanceLotNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Substance Expiration Date",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.True, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.True, HL7Required.True,"DTM")]
	    public DTM[] SubstanceExpirationDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Substance Manufacturer Name",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.True, HL7Required.True,"CE_0227")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.True, HL7Required.True,"CE_0227")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.True, HL7Required.True,"CWE")]
		[ManufacturersofVaccinescodeMVX]
	    public CWE[] SubstanceManufacturerName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Indication",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] Indication {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Dispense Package Size",22)]
  	    [HL7Field(HL7Version.v23, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM DispensePackageSize {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Dispense Package Size Unit",23)]
  	    [HL7Field(HL7Version.v23, 23, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 23, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE DispensePackageSizeUnit {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Dispense Package Method",24)]
  	    [HL7Field(HL7Version.v23, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"ID")]
		[DispenseMethod]
	    public ID DispensePackageMethod {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Supplementary Code",25)]
  	    [HL7Field(HL7Version.v24, 25, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 25, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 25, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] SupplementaryCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Initiating Location",26)]
  	    [HL7Field(HL7Version.v24, 26, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 26, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 26, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE InitiatingLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("27 Packaging/Assembly Location",27)]
  	    [HL7Field(HL7Version.v24, 27, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 27, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 27, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 27, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 27, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE PackagingAssemblyLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("28 Actual Drug Strength Volume",28)]
  	    [HL7Field(HL7Version.v25, 28, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 28, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 28, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 28, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM ActualDrugStrengthVolume {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("29 Actual Drug Strength Volume Units",29)]
  	    [HL7Field(HL7Version.v25, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 29, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ActualDrugStrengthVolumeUnits {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("30 Dispense to Pharmacy",30)]
  	    [HL7Field(HL7Version.v25, 30, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 30, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 30, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 30, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE DispensetoPharmacy {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("31 Dispense to Pharmacy Address",31)]
  	    [HL7Field(HL7Version.v25, 31, HL7Repeat.False, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v251, 31, HL7Repeat.False, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v26, 31, HL7Repeat.False, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v27, 31, HL7Repeat.False, HL7Required.True,"XAD")]
	    public XAD DispensetoPharmacyAddress {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("32 Pharmacy Order Type",32)]
  	    [HL7Field(HL7Version.v25, 32, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 32, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 32, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 32, HL7Repeat.False, HL7Required.True,"ID")]
		[PharmacyOrderTypes]
	    public ID PharmacyOrderType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("33 Dispense Type",33)]
  	    [HL7Field(HL7Version.v25, 33, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 33, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 33, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 33, HL7Repeat.False, HL7Required.True,"CWE")]
		[DispenseType]
	    public CWE DispenseType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("34 Pharmacy Phone Number",34)]
  	    [HL7Field(HL7Version.v27, 34, HL7Repeat.True, HL7Required.True,"XTN")]
	    public XTN[] PharmacyPhoneNumber {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 46)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 47)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 48)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 49)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 50)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 51)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 52)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 53)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 54)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			DispenseSubIDCounter = (NM)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(NM), "RXD.1");
			DispenseGiveCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(CWE), "RXD.2");
			DateTimeDispensed = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(DTM), "RXD.3");
			ActualDispenseAmount = (NM)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(NM), "RXD.4");
			ActualDispenseUnits = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(CWE), "RXD.5");
			ActualDosageForm = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(CWE), "RXD.6");
			PrescriptionNumber = (ST)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(ST), "RXD.7");
			NumberofRefillsRemaining = (NM)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(NM), "RXD.8");
	    	DispenseNotes = (ST[])ParseTextAtPositionIntoDataArray<ST>(segmentTextParts, 9, options, "RXD.9");
	    	DispensingProvider = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 10, options, "RXD.10");
			SubstitutionStatus = (ID)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(ID), "RXD.11");
			TotalDailyDose = (CQ)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(CQ), "RXD.12");
			DispensetoLocation = (LA2)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(LA2), "RXD.13");
			NeedsHumanReview = (ID)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(ID), "RXD.14");
	    	PharmacyTreatmentSuppliersSpecialDispensingInstructions = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 15, options, "RXD.15");
			ActualStrength = (NM)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(NM), "RXD.16");
			ActualStrengthUnit = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(CWE), "RXD.17");
	    	SubstanceLotNumber = (ST[])ParseTextAtPositionIntoDataArray<ST>(segmentTextParts, 18, options, "RXD.18");
	    	SubstanceExpirationDate = (DTM[])ParseTextAtPositionIntoDataArray<DTM>(segmentTextParts, 19, options, "RXD.19");
	    	SubstanceManufacturerName = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 20, options, "RXD.20");
	    	Indication = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 21, options, "RXD.21");
			DispensePackageSize = (NM)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(NM), "RXD.22");
			DispensePackageSizeUnit = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(CWE), "RXD.23");
			DispensePackageMethod = (ID)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(ID), "RXD.24");
	    	SupplementaryCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 25, options, "RXD.25");
			InitiatingLocation = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 26, options, typeof(CWE), "RXD.26");
			PackagingAssemblyLocation = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 27, options, typeof(CWE), "RXD.27");
			ActualDrugStrengthVolume = (NM)ParseTextAtPositionIntoData(segmentTextParts, 28, options, typeof(NM), "RXD.28");
			ActualDrugStrengthVolumeUnits = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 29, options, typeof(CWE), "RXD.29");
			DispensetoPharmacy = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 30, options, typeof(CWE), "RXD.30");
			DispensetoPharmacyAddress = (XAD)ParseTextAtPositionIntoData(segmentTextParts, 31, options, typeof(XAD), "RXD.31");
			PharmacyOrderType = (ID)ParseTextAtPositionIntoData(segmentTextParts, 32, options, typeof(ID), "RXD.32");
			DispenseType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 33, options, typeof(CWE), "RXD.33");
	    	PharmacyPhoneNumber = (XTN[])ParseTextAtPositionIntoDataArray<XTN>(segmentTextParts, 34, options, "RXD.34");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("RXD");
			segmentParts.Add(GetER7TextForSegmentPart(DispenseSubIDCounter, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispenseGiveCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(DateTimeDispensed, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualDispenseAmount, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualDispenseUnits, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualDosageForm, options));
		    segmentParts.Add(PrescriptionNumber);
			segmentParts.Add(GetER7TextForSegmentPart(NumberofRefillsRemaining, options));
		    segmentParts.Add(ConvertStringArray(DispenseNotes, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(DispensingProvider, options));
		    segmentParts.Add(SubstitutionStatus);
			segmentParts.Add(GetER7TextForSegmentPart(TotalDailyDose, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispensetoLocation, options));
		    segmentParts.Add(NeedsHumanReview);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PharmacyTreatmentSuppliersSpecialDispensingInstructions, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualStrength, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualStrengthUnit, options));
		    segmentParts.Add(ConvertStringArray(SubstanceLotNumber, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SubstanceExpirationDate, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SubstanceManufacturerName, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(Indication, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispensePackageSize, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispensePackageSizeUnit, options));
		    segmentParts.Add(DispensePackageMethod);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SupplementaryCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(InitiatingLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(PackagingAssemblyLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualDrugStrengthVolume, options));
			segmentParts.Add(GetER7TextForSegmentPart(ActualDrugStrengthVolumeUnits, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispensetoPharmacy, options));
			segmentParts.Add(GetER7TextForSegmentPart(DispensetoPharmacyAddress, options));
		    segmentParts.Add(PharmacyOrderType);
			segmentParts.Add(GetER7TextForSegmentPart(DispenseType, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PharmacyPhoneNumber, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

